CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )

SET( PROJECT_NAME_TEMP DiolTest )

IF( DiolLib_SOURCE_DIR )
	
	PROJECT( ${PROJECT_NAME_TEMP} )

	INCLUDE( "${DiolLib_SOURCE_DIR}/FindDirectInput.cmake" )
	#MESSAGE("DirectInput:")
	#MESSAGE("Found:	${DIRECTINPUT_FOUND}")
	#MESSAGE("Include: ${DirectInput_INCLUDE_DIR}")
	#MESSAGE("Libs: ${DirectInput_LIBRARIES}")

	ADD_DEFINITIONS( -DUNICODE -D_UNICODE )		
	
	INCLUDE_DIRECTORIES( ${DiolLib_SOURCE_DIR} ${DirectInput_INCLUDE_DIR} )
	
	SET	(	SOURCES
			Main.cpp
		)
	
	ADD_EXECUTABLE( ${PROJECT_NAME} ${SOURCES} )
	
	TARGET_LINK_LIBRARIES( ${PROJECT_NAME} DiolLib ${DirectInput_LIBRARIES} )
	
ELSE()
	
	MESSAGE("Can't find DiolLib. Project ${PROJECT_NAME_TEMP} won't be compiled")

ENDIF()
	